SQL: A Step By Step Guide To Learn SQL For Absolute Beginner by Trinity Lilly
Author:Trinity, Lilly [Trinity, Lilly]
Language: eng
Format: epub
Published: 2019-12-31T16:00:00+00:00
Set Operators
The SQL language includes three set operators that allow you to perform each of the various set operations described earlier in the chapter. Additionally, each set operator has two flavors, one that includes duplicates and another that removes duplicates (but not necessarily all of the duplicates). The following subsections define each operator and demonstrate how they are used.
The Union Operator
The union and union all operators allow you to combine multiple data sets. The difference between the two is that union sorts the combined set and removes duplicates, whereas union all does not. With union all, the number of rows in the final data set will always equal the sum of the number of rows in the sets being combined. This operation is the simplest set operation to perform (from the server’s point of view), since there is no need for the server to check for overlapping data. The following example demonstrates how you can use the union all operator to generate a full set of customer data from the two customer subtype tables:
mysql> SELECT 'IND' type_cd, cust_id, lname name
-> FROM individual
-> UNION ALL
-> SELECT 'BUS' type_cd, cust_id, name
-> FROM business;
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8301)
Test-Driven Development with Java by Alan Mellor(6731)
Data Augmentation with Python by Duc Haba(6644)
Principles of Data Fabric by Sonia Mezzetta(6396)
Learn Blender Simulations the Right Way by Stephen Pearson(6294)
Microservices with Spring Boot 3 and Spring Cloud by Magnus Larsson(6167)
Hadoop in Practice by Alex Holmes(5959)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5807)
RPA Solution Architect's Handbook by Sachin Sahgal(5563)
Big Data Analysis with Python by Ivan Marin(5368)
The Infinite Retina by Robert Scoble Irena Cronin(5253)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5148)
Pretrain Vision and Large Language Models in Python by Emily Webber(4331)
Infrastructure as Code for Beginners by Russ McKendrick(4092)
Functional Programming in JavaScript by Mantyla Dan(4038)
The Age of Surveillance Capitalism by Shoshana Zuboff(3955)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3806)
Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson(3610)
Applied Machine Learning for Healthcare and Life Sciences Using AWS by Ujjwal Ratan(3581)
